Right permissions for folders and files on web folder #1579
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
If a custom skeleton is used with folders inside it, the permissions are 644 which is wrong.
This commit fixes that.
PS: Resubmitted from #1464
Long answer:
When a new web domain is added to VestaCP, VestaCP gets its skeleton tree (files and folders) from /usr/local/vesta/data/templates/web/skel/
With the default skeleton, permissions were fine with the way it was setting them, there were only two files (index.html and robots.txt) with 644
But if you change the files on /usr/local/vesta/data/templates/web/skel/ with, let's say, WordPress instalation, then all files and folders would be also 644. With this fix, files continue to be 644 and folders will be 755 as it should.
If you don't use custom skeleton, you won't see any change; if you use custom skeleton, then now the permissions will be set right